<?php

namespace App\Rules;

use App\Facades\Sigma;
use Closure;
use Illuminate\Contracts\Validation\ValidationRule;

class OrderNoRule implements ValidationRule
{
    public function validate(string $attribute, mixed $value, Closure $fail): void
    {
        if (!Sigma::verify($value)) {
            $fail('编码有误，请仔细核对');
        }
    }
}
